package com.hsogoo.avatar.controller.service;

import com.hsogoo.avatar.annotations.AvatarProvider;
import com.hsogoo.avatar.annotations.AvatarProviderControl;
import com.hsogoo.avatar.api.UserService;

/**
 * Created by za-huangsaigang on 2018/10/17.
 */
@AvatarProvider(registry = "localhost:2181", group = "avatar", version = "1.0.0", limit = 10)
public class UserServiceProvider implements UserService {

    @Override
    @AvatarProviderControl(limit = 30, fallback = "xxx.xxx.Class")
    public String sayHello(String name){
        System.out.println("UserServiceProvider.sayHello..." + name);
//        try {
//            Thread.sleep(5000L);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        return "hello" + name;
    }
}
